*{
    margin: 0;
    padding: 0;
}

body,html{
    width: 100%;
    height: 100%;
}
.nav-box{
    width: 200px;
    background: rgb(50, 65, 87);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding-top: 40px;
}
.nav-box ul{
    list-style: none;
    line-height: 50px;
    font-size: 14px;
    color: #ddd;
}
.nav-box ul .nav-block{
    padding-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    position: relative;
    font-size:20px;
    padding-top: 10px;
    margin-top: 20px;
}
.nav-box ul .nav-block:hover{
    color: #fff;
    background: rgb(40, 52, 70);
}
.nav-box ul li i{
    display: inline-block;
    width: 40px;
    height: 40px;
}
.nav-two a:link{
    color: #fff;

}
.nav-two a:link{
    color: #fff;

}
.nav-box ul li i.arrow{
    position: absolute;
    top: 5px;
    right: 5px;
}


.nav-box .nav-block.on i.arrow{
    transform: rotate(0deg);
}
.nav-box .nav-two{
    display: block;
    width: 100%;
    font-size: 13px;
    line-height: 45px;
    display: none;
}
.nav-block.on+ul.nav-two{
    display: block;
}
.nav-box .nav-two li{

    padding-left: 38px;
    cursor: pointer;
}
.nav-box .nav-two li:hover{
    background: rgb(40, 52, 70);
}
.header{
    border: solid 1px black;
    width: 1800px;
    height: 60px;
    background: green;
    
}
.header h1{
    text-align: center ;
    font-size: 50px;
    font-family: 隶书;
    letter-spacing: 20px;
    position: relative;
}
.return {
    width:600 px;
    height: 30px;
    position: absolute;
    top: 20px;
    left: 1550px;
    font-size: 30px;
}
.return a{
    text-decoration: none;
}    
:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --accent: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-800: #1f2937;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', system-ui;
    background: var(--gray-100);
}
/* 导航栏 */

.nav-container {

    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: 70px;
}
.search-bar {
    flex: 1;
    max-width: 600px;
    position: relative;
}
.search-input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 2px solid var(--gray-100);
    border-radius: 2rem;
    transition: all 0.3s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}
/* 商品网格 */
.product-grid {
    max-width: 1400px;
    margin-top: 50px;
margin-left: 230px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
/* 商品卡片 */
.product-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}
.product-image {
    aspect-ratio: 4/3;
    position: relative;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}
.product-info {
    padding: 1.5rem;
}
.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}
.product-price {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0;
}
.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
/* 交互效果 */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.product-card:hover .product-img {
    transform: scale(1.05);
}
.add-to-cart:hover {
    background: var(--secondary);
}
/* 购物车图标 */
.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
    }
}
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    transition: right 0.3s ease;
  }
  .cart-sidebar.active {
    right: 0;
  }